<script type="text/javascript" src="{$smarty.const.THEME_RELATIVE}modules/calendarmodule/js/ManagePage.js"></script>

<div id="abpv_loadingDiv">
	<img src="{$smarty.const.THEME_RELATIVE}modules/calendarmodule/images/loading.gif">
</div>

<h1>{$_TR.Event_Manage_Title}</h1>
	<table id="EventManager" toolbar="#toolbar" singleSelect="true"></table>
	
	<div id="toolbar">
		<a href="{link action=edit}" class="easyui-linkbutton" iconCls="icon-add" plain="true">{$_TR.new_event}</a>
		<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="__AB_CalendarModule_EditEvent('EventManager')">{$_TR.edit_event}</a>
		<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="__AB_CalendarModule_DeleteEvent('EventManager')">{$_TR.remove_event}</a>
		<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-ok" plain="true" onclick="__AB_CalendarModule_Approve('EventManager')">{$_TR.approve_event}</a>
	</div>

{* Dialog for approve *}
<div id="dialog_Approve" icon="icon-ok" style="padding: 10px;">
	<div class="control">
		<label>
			<span class="label">{$_TR.approve_state}</span>
			<select id="dialog_approve_select">
				<option value=0>{$_TR.approve_state0}</option>
				<option value=1>{$_TR.approve_state1}</option>
				<option value=2>{$_TR.approve_state2}</option>
			</select>
		</label>
	</div>
</div>
	
	<script>
		var link_url='{$smarty.const.URL_FULL}index.php?module=calendarmodule&action=manage_getjson&src={$__loc->src}&ajax_action=1';
		var permission_approve={$permission_approve};
		var lang_dialog_approve_title='{$_TR.approve_dialog_title}';
		{literal}
		$(function(){
			__AB_PDoremi_EventManager_SetDefaultSource({/literal}'{$__loc->src}'{literal})
			__AB_PDoremi_EventManager_Init("EventManager");
		});
	</script>
{/literal}